package com.itheima.map;

import java.util.Hashtable;

public class Demo01 {

    public static void main(String[] args) throws InterruptedException {
        Hashtable<String, String> map = new Hashtable<>();

        new Thread(()->{
            for (int i = 0; i < 25; i++) {
                map.put(i+"",i+"");
            }
        }).start();
        new Thread(()->{
            for (int i = 25; i < 51; i++) {
                map.put(i+"",i+"");
            }
        }).start();

        Thread.sleep(1000);


        /*map.forEach((k,v)->{
            System.out.println(k+"@@@"+v);
        });
*/
        for (int i = 0; i < 51; i++) {
            System.out.println(map.get(i+""));
        }



    }
}
